<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" data-rule='required'>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>{:__('Inspect_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-inspect_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[inspect_time]" type="text" value="" {:$isSuperAdmin?'':'data-rule="required"'}>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>{:__('Inspect_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-inspect_address" class="form-control" name="row[inspect_address]" type="text" {:$isSuperAdmin?'':'data-rule="required"'}>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>{:__('Leader_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $isSuperAdmin}
            {:build_select('row[leader_ids][]',$leaders,[],['id'=>"leader_ids",'multiple'=>true,'class'=>'form-control selectpicker'])}
            {else/}
            {:build_select('row[leader_ids][]',$leaders,[],['id'=>"leader_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required'])}
            {/if}

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>{:__('Accompany_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!-- <input id="c-accompany_name" class="form-control" name="row[accompany_name]" type="text" {:$isSuperAdmin?'':'data-rule="required"'}> -->

            {if $isSuperAdmin}
            {:build_select('row[accompany_ids][]',$chargeDeps,[],['id'=>"accompany_ids",'multiple'=>true,'class'=>'form-control selectpicker'])}
            {else/}
            {:build_select('row[accompany_ids][]',$chargeDeps,[],['id'=>"accompany_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required'])}
            {/if}

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>{:__('Inspect_memo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-inspect_memo" class="form-control " rows="5" name="row[inspect_memo]" cols="50" {:$isSuperAdmin?'':'data-rule="required"'}></textarea>
        </div>
    </div>
    {if $isSuperAdmin}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>责任部门:</label>
        <div class="col-xs-12 col-sm-8">
             {:build_select('row[chargedep_ids][]',$chargeDeps,[],['id'=>"chargedep_ids",'multiple'=>true,'class'=>'form-control selectpicker','data-rule'=>'required'])}
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>项目状态:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[project_status]',$Think.config.app.project_status,0,['id'=>"project_status",'class'=>'project_status form-control','data-rule'=>'required'])}
            <!-- {:build_select('row[project_status]',$Think.config.app.project_status,0,['id'=>"project_status",'multiple'=>true,'class'=>'form-control','data-rule'=>'required'])} -->
        </div>
    </div>

    <div class="form-group project_time" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2"><span style="color: red;">*</span>项目状态时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-project_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[project_time]" type="text" value="" >
        </div>
    </div>



    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
